// 引入exporess框架 记得npm i express --save
var express = require('express');

// 获取，路由对象
const router = express.Router();

router.post("/queryList", (req, res) => {
    let data = req.body;
    let arr = [];
    let str = "";
    if (data.value == 0) {
        str = "全部";
       
    } else if (data.value == 1) {
        str = "未完成";
    } else {
        str = "已完成";
    }
    for (let i = 1;i <= 20;i ++) {
        arr.push({title: str + i,id: i} );
    }
   
    res.json({
        status: 1,
        msg: "查询成功",
        result_data: arr
    });
    
    
})


module.exports = router;